import type { AppRouteModule } from '@/router/types'

import { LAYOUT } from '@/router/constant'
import { t } from '@/hooks/web/useI18n'

const system: AppRouteModule = {
  path: '/collection',
  name: 'Collection',
  component: LAYOUT,
  redirect: '/collection/device',
  meta: {
    orderNo: 6,
    icon: 'clarity:data-cluster-outline-badged',
    title: t('routes.collection.moduleName'),
  },
  children: [
    {
      path: 'device',
      name: 'DeviceManage',
      meta: {
        title: t('routes.collection.device'),
        ignoreKeepAlive: false,
      },
      component: () => import('@/views/collection/device/index.vue'),
    },
    // {
    //   path: 'account_detail/:id',
    //   name: 'AccountDetail',
    //   meta: {
    //     hideMenu: true,
    //     title: t('routes.system.account_detail'),
    //     ignoreKeepAlive: true,
    //     showMenu: false,
    //     currentActiveMenu: '/system/account',
    //   },
    //   component: () => import('@/views/system/account/AccountDetail.vue'),
    // },
    {
      path: 'data',
      name: 'DataManage',
      meta: {
        title: t('routes.collection.data'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/data/index.vue'),
    },
    // {
    //   path: 'type',
    //   name: 'TypeManage',
    //   meta: {
    //     title: t('routes.collection.type'),
    //     ignoreKeepAlive: true,
    //   },
    //   component: () => import('@/views/collection/type/index.vue'),
    // },
    {
      path: 'classify',
      name: 'ClassifyManage',
      meta: {
        title: t('routes.collection.classify'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/classify/index.vue'),
    },
    {
      path: 'scence',
      name: 'ScenceManage',
      meta: {
        title: t('routes.collection.scence'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/scence/index.vue'),
    },
    {
      path: 'alarm',
      name: 'AlarmManage',
      meta: {
        title: t('routes.collection.alarm'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/alarm/index.vue'),
    },
    {
      path: 'record',
      name: 'RecordManage',
      meta: {
        title: t('routes.collection.record'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/record/index.vue'),
    },
    {
      path: 'dataUpload',
      name: 'dataUpload',
      meta: {
        title: '数据上传',
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/collection/dataUpload/index.vue'),
    },
  ],
}

export default system
